// import utils from "./utils.js";
// 引入工具类函数
import {login,focus} from "./request.js";
// 调用函数发送请求
(async function(){
    let res = await login();
    let token = res.data.token;

    let Focus= await focus();
    // 生活在蚂蚁
    let focusItem = Focus.data.rows;
    console.log(focusItem);
    
    let focusArr = focusItem.filter((item)=>{
        return item.sketch === "，";
    });
    console.log(focusArr);

    foucusFn(focusArr);
})();
// let right = document.querySelector("right")
// right.innerText =
// console.log('dddd')

// 获取关注员工 元素
let focusE = document.querySelector(".main");
// 关注员工 数据渲染
function foucusFn(data){
    let str ="";
    data.forEach((item)=>{
        str += `
        <div class="picture">
        <div class="lfet">
        <img
          src=${item.cover}
          alt=""
        />
      </div>
      <!-- 图片右边盒子 -->
      <div class="right">
        <div class="right_size">
          <h2>${item.name}</h2>
          <p>
            ${item.content}
          </p>
        </div>
      </div>
      </div>
        `;
    });
    focusE.innerHTML = str;
};


